package moe.bogos.douro.api.common;

import moe.bogos.douro.api.common.soul.skill.Skill;
import net.minecraft.nbt.CompoundNBT;

public abstract class NamedAgedSkillContainer extends AgedSkillContainer implements Nameable
{

    protected String name;

    public NamedAgedSkillContainer(int year, String name, Skill[] skills)
    {
        super(year, skills);
        this.name = name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public CompoundNBT writeToNbt()
    {
        CompoundNBT nbt = super.writeToNbt();
        nbt.putString(Constants.NAME, name);
        return super.writeToNbt();
    }
}
